/*
 *
 * Copyright (C) 2019 Zealcomm Inc. (https://www.zealcomm.com)
 *
*/

#ifndef IRTC_BASE_OBJC_IRTCCLIENTCONFIGURATION_H_
#define IRTC_BASE_OBJC_IRTCCLIENTCONFIGURATION_H_
#import <Foundation/Foundation.h>
#import <IRTC/IRTCMacros.h>

NS_ASSUME_NONNULL_BEGIN

IRTC_OBJC_EXPORT
@interface IRTCIceServer : NSObject
{
  @private
    __strong NSArray<NSString*> *_urls;
    __strong NSString *_username;
    __strong NSString *_password;
}
- (instancetype)initWithUrls:(NSArray<NSString*>*)urls username:(NSString*)username password:(NSString*)password;

/// URLs for this group of ICE server.<br>当前ICE服务器组的URLs
@property(nonatomic, copy) NSArray<NSString*>* urls;
/// Username.<br>用户名
@property(nonatomic, copy) NSString* username;
/// Password.<br>密码
@property(nonatomic, copy) NSString* password;

@end

typedef NS_ENUM(NSInteger, IRTCCandidateNetworkPolicy) {
  IRTCCandidateNetworkPolicykAll = 1,
  IRTCCandidateNetworkPolicykLowCost = 2
};

/// Base class for configurations for conference client.<br>会议客户端配置的基类。
IRTC_OBJC_EXPORT
@interface IRTCClientConfiguration : NSObject
{
  @private
    __strong NSArray<IRTCIceServer*> *_ice_servers;
    IRTCCandidateNetworkPolicy _candidate_network_policy;
}
- (instancetype)initWithIceServers:(NSArray<IRTCIceServer*>*)ice_servers candidateNetworkPolicy:(IRTCCandidateNetworkPolicy) candidate_network_policy;

/// List of ICE servers<br>ICE服务器的列表
@property(nonatomic, strong) NSArray<IRTCIceServer*>* ice_servers;
/**
 @brief Candidate collection policy.<br>候选者收集策略。
 @details If you do not want cellular network when WiFi is available, please
 use IRTCCandidateNetworkPolicy::kLowCost. Using low cost policy may not have good
 network experience. Default policy is collecting all candidates.<br>如果你不希望在
 有WiFi的时候用移动网络，请使用IRTCCandidateNetworkPolicy::kLowCost。使用低价策略可能会导致
 较差的网络体验。默认的策略是收集所有的候选者。
*/
@property(nonatomic) IRTCCandidateNetworkPolicy candidate_network_policy;

@end
NS_ASSUME_NONNULL_END
#endif // IRTC_BASE_OBJC_IRTCCLIENTCONFIGURATION_H_